hysop.parameters.parameter module¶
Parameters description.
* Parameter
- class hysop.parameters.parameter.Parameter(name, parameter_types, initial_value=None, allow_None=False, quiet=False, const=False, pretty_name=None, var_name=None, is_view=False, **kwds)[source]¶
Bases:
TaggedObject
,VariableTag
A parameter is a value of a given type that may change value as simulation advances. Parameters are only available on the host backend.
Initialize a TaggedObject with a tag prefix/postfix/formatter, all optional.
- static __new__(cls, name, parameter_types, initial_value=None, allow_None=False, quiet=False, const=False, pretty_name=None, var_name=None, is_view=False, **kwds)[source]¶
Create or _get an existing Parameter with a specific name and type.
- Parameters:
name (string) – A name for the parameter. A parameter is uniquely identified by its name.
pretty_name (string) – A pretty name for the parameter.
var_name (string) – A variable name for the parameter.
parameter_types (type of array like of types) – Allowed types for the parameter. None is accepted only if allow_none is set to True.
initial_value (optional, defaults to None) – Type is not checked at initialization to allow initial None.
allow_None (bool, optional) – Set this to True to allow None as valid value.
const (bool, optional) – Set this parameter constant (initial_value should be given).
quiet (bool, optional) – Do not print parameter in value change. Defaults to False.
is_view (bool) – Is this parameter a view on another parameter ?
kwds (dict) – Base class arguments.
- value¶
_get or set the current value of this Parameter object. Returned value is is a copy or a read-only reference to the current parameter value.
- parameter_types¶
Return allowed parameter types for this parameter.
- property const¶
Return True if this parameter was set to be constant.
- property is_view¶
Return True if this parameter is a view on another parameter.
- property name¶
Return parameter name.
- property parameter_types¶
Return allowed parameter types for this parameter.
- property pretty_name¶
Return parameter pretty name.
- property quiet¶
Return True if this parameter was set to be quiet.
- property s¶
Return the symbolic variable associated to this parameter.
- property symbol¶
Return the symbolic variable associated to this parameter.
- property value¶
_get the current value of this Parameter object. Returned value is not a reference to current parameter value.
- property var_name¶
Return parameter variable name.